<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        @keyframes myfirst {
            0% {
                width: 1500px;
            }
            100% {
                width: 1px;
            }
        }
        
        .ani {
            background-color: red;
            /* width: 200px; */
            height: 30px;
            margin: 20px 0 0 20px;
            animation: myfirst 15s;
            animation-duration: 15s;
            animation-iteration-count: 2s;
            animation-iteration-count: infinite;
        }
    </style>
</head>

<body>
    <div class="ani">血量</div>
</body>

</html>